#pragma once

#include <sstream>
#include <stdexcept>

namespace header
{

class NumberExcep : public std::exception
{
public:
    NumberExcep() = default;
    NumberExcep(const std::string& msg) :_msg{ msg } {}
    virtual ~NumberExcep() = default;

public:
    virtual const char* what() const noexcept override { return _msg.c_str(); }

protected:
    std::string _msg;
};

#define WHERE_STATEMENT std::string{__FILE__} + ":" + std::to_string(__LINE__)

#define NUMBER_THROW_SWITCH_DEFAULT_OUTDATED \
    throw header::NumberExcep{"outdated switch's default statement [" + WHERE_STATEMENT + "]"}

}   // namespace header
